#page-404 {
  margin: auto;
  padding: 0 24px;
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  text-align: center;

  .error-container {
    font-size: 106px;
    font-weight: 800;

    & > span {
      display: inline-block;
      position: relative;

      &.four {
        width: 136px;
        height: 43px;
        border-radius: 999px;
        background: linear-gradient(
            140deg,
            rgba(0, 0, 0, 0.1) 0%,
            rgba(0, 0, 0, 0.07) 43%,
            transparent 44%,
            transparent 100%
          ),
          linear-gradient(
            105deg,
            transparent 0%,
            transparent 40%,
            rgba(0, 0, 0, 0.06) 41%,
            rgba(0, 0, 0, 0.07) 76%,
            transparent 77%,
            transparent 100%
          ),
          linear-gradient(to right, @primary-4, @primary-5);

        &::before,
        &::after {
          content: "";
          display: block;
          position: absolute;
          border-radius: 999px;
        }

        &::before {
          width: 43px;
          height: 156px;
          left: 60px;
          bottom: -43px;
          background: linear-gradient(
              128deg,
              rgba(0, 0, 0, 0.1) 0%,
              rgba(0, 0, 0, 0.07) 40%,
              transparent 41%,
              transparent 100%
            ),
            linear-gradient(
              116deg,
              rgba(0, 0, 0, 0.1) 0%,
              rgba(0, 0, 0, 0.07) 50%,
              transparent 51%,
              transparent 100%
            ),
            linear-gradient(
              to top,
              @primary-5,
              @primary-4,
              @primary-3,
              @primary-4,
              @primary-5
            );
        }

        &::after {
          width: 137px;
          height: 43px;
          transform: rotate(-49.5deg);
          left: -18px;
          bottom: 36px;
          background: linear-gradient(
            to right,
            @primary-5,
            @primary-4,
            @primary-3,
            @primary-4,
            @primary-5
          );
        }
      }

      &.zero {
        vertical-align: text-top;
        width: 156px;
        height: 156px;
        border-radius: 999px;
        background: linear-gradient(
            -45deg,
            transparent 0%,
            rgba(0, 0, 0, 0.06) 50%,
            transparent 51%,
            transparent 100%
          ),
          linear-gradient(
            to top right,
            @primary-5,
            @primary-4,
            @primary-4,
            @primary-3,
            @primary-4,
            @primary-4,
            @primary-5
          );
        overflow: hidden;
        animation: bgShadow 5s infinite;

        &::before {
          content: "";
          display: block;
          position: absolute;
          transform: rotate(45deg);
          width: 90px;
          height: 90px;
          left: 0;
          bottom: 0;
          background: linear-gradient(
              95deg,
              transparent 0%,
              transparent 8%,
              rgba(0, 0, 0, 0.07) 9%,
              transparent 50%,
              transparent 100%
            ),
            linear-gradient(
              85deg,
              transparent 0%,
              transparent 19%,
              rgba(0, 0, 0, 0.05) 20%,
              rgba(0, 0, 0, 0.07) 91%,
              transparent 92%,
              transparent 100%
            );
        }

        &::after {
          content: "";
          display: block;
          position: absolute;
          border-radius: 999px;
          width: 70px;
          height: 70px;
          left: 43px;
          bottom: 43px;
          background: #ffffff;
          box-shadow: -2px 2px 2px 0 rgba(0, 0, 0, 0.1);
        }
      }
    }

    .screen-reader-text {
      position: absolute;
      top: -9999em;
      left: -9999em;
    }
  }

  .link-container {
    margin-top: 60px;
  }
}

@keyframes bgShadow {
  0% {
    box-shadow: inset -160px 160px 0px 5px rgba(0, 0, 0, 0.4);
  }
  45% {
    box-shadow: inset 0 0 0 0 rgba(0, 0, 0, 0.1);
  }
  55% {
    box-shadow: inset 0 0 0 0 rgba(0, 0, 0, 0.1);
  }
  100% {
    box-shadow: inset 160px -160px 0px 5px rgba(0, 0, 0, 0.4);
  }
}

@media only screen and (max-width: 767px) {
  #page-404 {
    .error-container {
      font-size: 53px;

      & > span {
        &.four {
          width: 68px;
          height: 22px;

          &::before {
            width: 22px;
            height: 78px;
            left: 30px;
            bottom: -22px;
          }

          &::after {
            width: 68px;
            height: 22px;
            left: -9px;
            bottom: 18px;
          }
        }

        &.zero {
          width: 78px;
          height: 78px;

          &::before {
            width: 45px;
            height: 45px;
          }

          &::after {
            width: 35px;
            height: 35px;
            left: 22px;
            bottom: 22px;
          }
        }
      }
    }
  }
}
